/*
 * @file com.chuanlian.mini.pay.controller.PaymentController.java
 * @date 2021/10/27
 * @author lhz
 * @copyright 马丁洛克 Corporation 2021 版权所有
 * @version 0.0.1
 */
package com.sinux.generality.provider.pay.controller;

import com.sinux.generality.provider.pay.form.PaymentOrderForm;
import com.sinux.generality.provider.pay.service.PayOrderService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author lhz
 * @version 0.0.1
 * @className PaymentController
 * @describe 拉起支付接口
 * @date 2021/10/27 17:03
 */
@RestController
@RequestMapping("/payment")
public class PaymentController {
    @Resource
    private PayOrderService payOrderService;

    /****
     * jsApiApy jsapi下单
     * @author lhz 
     * @param form
     * @return java.util.Map<java.lang.String,java.lang.Object>
     */
    
    @RequestMapping("/applet/pay")
    public Map<String, Object> jsApiApy(@RequestBody @Validated PaymentOrderForm form)  {
            return payOrderService.jsApiApy(form.getBusinessOrderId(),form.getOrderType());

    }

}